package cm.project;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class Test7 {
    public static void main(String[] args) throws IOException {
        //定义一个数组
        List<String> list=new ArrayList<>();
        //定义一个字符缓冲输入流
        BufferedReader br=new BufferedReader(new FileReader("Task2.txt"));
        String str=null;
        while ((str=br.readLine())!=null){
            list.add(str);
        }
        br.close();
        for (String s : list) {
            System.out.println(s);
        }
    }
}
